<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>CSI udp to server: /home/shuspieler/Atheros-CSI-Tool-UserSpace-APP/recvCSI-with-socket/main.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">CSI udp to server
   &#160;<span id="projectnumber">v1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.8 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">/home/shuspieler/Atheros-CSI-Tool-UserSpace-APP/recvCSI-with-socket/main.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>main function: log CSI to file or to server or to both.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;stdlib.h&gt;</code><br />
<code>#include &lt;stdio.h&gt;</code><br />
<code>#include &lt;string.h&gt;</code><br />
<code>#include &lt;unistd.h&gt;</code><br />
<code>#include &lt;fcntl.h&gt;</code><br />
<code>#include &lt;errno.h&gt;</code><br />
<code>#include &lt;termios.h&gt;</code><br />
<code>#include &lt;pthread.h&gt;</code><br />
<code>#include &lt;signal.h&gt;</code><br />
<code>#include &lt;sys/types.h&gt;</code><br />
<code>#include &lt;sys/stat.h&gt;</code><br />
<code>#include &quot;<a class="el" href="csi__fun_8h_source.html">csi_fun.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="udp_8c.html">udp.c</a>&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for main.c:</div>
<div class="dyncontent">
<div class="center"><img src="main_8c__incl.png" border="0" usemap="#_2home_2shuspieler_2Atheros-CSI-Tool-UserSpace-APP_2recvCSI-with-socket_2main_8c" alt=""/></div>
<map name="_2home_2shuspieler_2Atheros-CSI-Tool-UserSpace-APP_2recvCSI-with-socket_2main_8c" id="_2home_2shuspieler_2Atheros-CSI-Tool-UserSpace-APP_2recvCSI-with-socket_2main_8c">
<area shape="rect" id="node13" href="csi__fun_8h.html" title="head file for csi processing fucntion " alt="" coords="1029,109,1104,136"/><area shape="rect" id="node15" href="udp_8c.html" title="init and close function for socket(udp) " alt="" coords="241,109,295,136"/></map>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:aeca034f67218340ecb2261a22c2f3dcd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aeca034f67218340ecb2261a22c2f3dcd"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>BUFSIZE</b>&#160;&#160;&#160;4096</td></tr>
<tr class="separator:aeca034f67218340ecb2261a22c2f3dcd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a4f31a6fd48ee5d4579ae4aaaa3cae285"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4f31a6fd48ee5d4579ae4aaaa3cae285"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>sig_handler</b> (int signo)</td></tr>
<tr class="separator:a4f31a6fd48ee5d4579ae4aaaa3cae285"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ddf1224851353fc92bfbff6f499fa97"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8c.html#a0ddf1224851353fc92bfbff6f499fa97">main</a> (int argc, char *argv[])</td></tr>
<tr class="separator:a0ddf1224851353fc92bfbff6f499fa97"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a2896431d6a80cd39b3d24b40237612ee"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2896431d6a80cd39b3d24b40237612ee"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>quit</b></td></tr>
<tr class="separator:a2896431d6a80cd39b3d24b40237612ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f58335fad30c6bd2b698625a3d73d69"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9f58335fad30c6bd2b698625a3d73d69"></a>
unsigned char&#160;</td><td class="memItemRight" valign="bottom"><b>buf_addr</b> [BUFSIZE]</td></tr>
<tr class="separator:a9f58335fad30c6bd2b698625a3d73d69"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a063bbc9223e9af84c5c89bac0fe07c97"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a063bbc9223e9af84c5c89bac0fe07c97"></a>
unsigned char&#160;</td><td class="memItemRight" valign="bottom"><b>data_buf</b> [1500]</td></tr>
<tr class="separator:a063bbc9223e9af84c5c89bac0fe07c97"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a436cda53ccd071f63670e70d88352a89"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a436cda53ccd071f63670e70d88352a89"></a>
<a class="el" href="structCOMPLEX.html">COMPLEX</a>&#160;</td><td class="memItemRight" valign="bottom"><b>csi_matrix</b> [3][3][114]</td></tr>
<tr class="separator:a436cda53ccd071f63670e70d88352a89"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d2f33c074a1b238be658ca6a049110c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7d2f33c074a1b238be658ca6a049110c"></a>
<a class="el" href="structcsi__struct.html">csi_struct</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>csi_status</b></td></tr>
<tr class="separator:a7d2f33c074a1b238be658ca6a049110c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>main function: log CSI to file or to server or to both. </p>
<p>=====================================================================================</p>
<p>Here is an example for receiving CSI matrix, Basic CSi procesing fucntion is also implemented and called, Check <a class="el" href="csi__fun_8c.html" title="basic csi processing fucntion ">csi_fun.c</a> for detail of the processing function;</p>
<p>A function which log the CSI to a server is added in.</p>
<dl class="section version"><dt>Version</dt><dd>: 2.0</dd></dl>
<dl class="section author"><dt>Author</dt><dd>: Yaxiong Xie</dd></dl>
<p>modified by: Shu Ren</p>
<p>Email : <a href="#" onclick="location.href='mai'+'lto:'+'xie'+'ya'+'xio'+'ng'+'fly'+'@g'+'mai'+'l.'+'com'; return false;">xieya<span style="display: none;">.nosp@m.</span>xion<span style="display: none;">.nosp@m.</span>gfly@<span style="display: none;">.nosp@m.</span>gmai<span style="display: none;">.nosp@m.</span>l.com</a>; <a href="#" onclick="location.href='mai'+'lto:'+'ier'+'en'+'shu'+'@1'+'63.'+'co'+'m'; return false;">ieren<span style="display: none;">.nosp@m.</span>shu@<span style="display: none;">.nosp@m.</span>163.c<span style="display: none;">.nosp@m.</span>om</a></p>
<p>Organization: WANDS group @ Nanyang Technological University; LIKE @ FAU</p>
<p>Copyright (c) WANDS group @ Nanyang Technological University; LIKE @ FAU </p><hr/>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a0ddf1224851353fc92bfbff6f499fa97"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>argv</em>[]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>receive CSI and save to a file or send to a server or both</p>
<p>Usage 1: recv_csi &lt;output_file&gt;</p>
<p>Usage 2: recv_csi &lt;Server-ip&gt; &lt;port&gt;</p>
<p>Usage 3: recv_csi &lt;ip&gt; &lt;port&gt; &lt;output_file&gt; </p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Jun 28 2017 07:03:56 for CSI udp to server by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.8
</small></address>
</body>
</html>
